import java.util.Random;
import java.util.Scanner;

public class demo016 {
    public static void main(String[] args) {
        Random random=new Random();
        Scanner scan=new Scanner(System.in);
        int a=random.nextInt(11);
        int c=0;
        while(c<5) {
            System.out.println("请输入一个1到10的数");
            int b=scan.nextInt();
            if(b==a) {
                System.out.println("你真聪明,猜对了!");
                break;
            }
            else {
                if(b>a) {
                    System.out.println("大了,继续猜");
                }
                else {
                    System.out.println("小了,继续猜");
                }
            }
            c++;
        }
        if(c==5) {
            System.out.println("真笨,不跟你玩了");
        }
    }
}